package com.katus.server.dao;

import com.katus.server.entity.Book;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

/**
 * @author SUN Katus
 * @version 1.0, 2021-07-12
 */
public interface BookDAO {

    @Select("select * from book")
    List<Book> getAllBooks();

    @Select("select * from book where id = #{id}")
    Book selectById(@Param("id") Integer id);

    List<Book> selectByIdList(Collection<Integer> idList);

    void deleteById(@Param("id") Integer id);
}
